package cn.kgc.novel.mapper;

import cn.kgc.novel.pojo.Bookcontext;
import org.apache.ibatis.annotations.Param;

import java.util.List;
//杨将
public interface BookcontextMapper {
    //跟据小说名和作者id查数据
    public List<Bookcontext> selectshows(@Param("bookname") String bookname,@Param("uid") Integer uid);
    //跟据章节和小时名称那内容
    public Bookcontext flieshows(@Param("titleid")Integer titleid,@Param("bookname") String bookname);
    //根据小说名拿作者id
    public Integer naid(String name);
    //拿最近更新的章节
    public List<Bookcontext> nazhanges(String category,String sex);
    public void addBookcontext(Bookcontext bookcontext);
    //更据书的id和作者id来查询 这本书未发布的草稿章节
    public List<Bookcontext> draftchapter(@Param("bid") Integer bid,@Param("uid")Integer uid,@Param("titleid") Integer titleid);
    //从未发布换成待审核
    public void updatedraftchapter(@Param("bid") Integer bid,@Param("uid")Integer uid,@Param("titleid")Integer titleid);

    public void updateBookcontext(Bookcontext bookcontext);

    int deletecaogao(@Param("uid") Integer uid,@Param("bid") Integer bid,@Param("titleid") Integer titleid);

    //查看所有未审核的章节,袁宇灏
    List<Bookcontext> getByStatuc();
    //通过cid查找
    List<Bookcontext> getByCid(Integer cid);
    //审核 2023-11-23
    void setStatus(String status,Integer cid,String reason);

    public void deleteBookcontext(int authorid,int bid);
}
